

<?php
require_once 'config/config.php';
$connection = mysql_connect($DB_HOST . ':' . $DB_PORT, $DB_USER, $DB_PASS);
mysql_select_db($DB_NAME, $connection);

function getData($query) {
    global $connection;
    $data = array();
    $result = mysql_query($query, $connection);
    while ($row = mysql_fetch_assoc($result)) {
        $data[] = $row;
    }
    return $data;
}
?>



